Optimal. Leaf size=41 \[ x (x+1)^p \left (x^2-x+1\right )^p \left (x^3+1\right )^{-p} \, _2F_1\left (\frac{1}{3},-p;\frac{4}{3};-x^3\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0122855, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {713, 245} \[ x (x+1)^p \left (x^2-x+1\right )^p \left (x^3+1\right )^{-p} \, _2F_1\left (\frac{1}{3},-p;\frac{4}{3};-x^3\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 713
Rule 245
Rubi steps
\begin{align*} \int (1+x)^p \left (1-x+x^2\right )^p \, dx &=\left ((1+x)^p \left (1-x+x^2\right )^p \left (1+x^3\right )^{-p}\right ) \int \left (1+x^3\right )^p \, dx\\ &=x (1+x)^p \left (1-x+x^2\right )^p \left (1+x^3\right )^{-p} \, _2F_1\left (\frac{1}{3},-p;\frac{4}{3};-x^3\right )\\ \end{align*}
Mathematica [C] time = 0.112215, size = 132, normalized size = 3.22 \[ \frac{\left (\frac{-2 i x+\sqrt{3}+i}{\sqrt{3}+3 i}\right )^{-p} \left (\frac{2 i x+\sqrt{3}-i}{\sqrt{3}-3 i}\right )^{-p} (x+1)^{p+1} \left (x^2-x+1\right )^p F_1\left (p+1;-p,-p;p+2;\frac{2 i (x+1)}{3 i+\sqrt{3}},-\frac{2 i (x+1)}{-3 i+\sqrt{3}}\right )}{p+1} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 1.566, size = 0, normalized size = 0. \begin{align*} \int \left ( 1+x \right ) ^{p} \left ({x}^{2}-x+1 \right ) ^{p}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (x^{2} - x + 1\right )}^{p}{\left (x + 1\right )}^{p}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (x^{2} - x + 1\right )}^{p}{\left (x + 1\right )}^{p}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (x + 1\right )^{p} \left (x^{2} - x + 1\right )^{p}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (x^{2} - x + 1\right )}^{p}{\left (x + 1\right )}^{p}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]